home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / RISCy Bitsness / video.v < prev   
Encoding:
Text File  |  1992-06-18  |  447 b   |  35 lines  |  [TEXT/MPS ]

  1. module video(d,vras,cas,ma,w);
  2.  
  3.     inout     [31: 0]d;
  4.     reg         [31: 0]dd;
  5.     assign        d = dd;
  6.     
  7.     input            vras, cas, w;
  8.     
  9.     input     [ 9: 0]ma;
  10.     
  11.     reg         [19: 0]addr;
  12.     
  13.     reg         [31: 0]file;
  14.     
  15.     always @(negedge vras) begin
  16.         addr[19:10] = ma;
  17.     end
  18.  
  19.     always @(posedge vras)
  20.         dd = 32'bz;
  21.         
  22.     always @(negedge cas) 
  23.     begin
  24.         addr[9:0] = ma;
  25.         if (w) begin
  26.             $display("%h %h", addr, d);
  27.         end
  28.     end
  29.     
  30. //    initial begin
  31. //        file = $fopen("sim.out");
  32. //    end
  33.  
  34. endmodule
  35.